package com.bolt.report.definition;

public enum RequestType {
    FORMDATA(0),

    JSON(1);

    Integer code;

    RequestType(Integer code) {
        this.code = code;
    }

    public static RequestType toType(Integer code) {
        for (RequestType typeEnum : RequestType.values()) {
            if (typeEnum.code.equals(code)) {
                return typeEnum;
            }
        }
        return null;
    }
}